package com.heima.utils.common;

import com.heima.model.user.pojos.ApUser;

/**
 * @author jay
 * @date 2022/11/16 17:03:17
 */
public class CommentUserThreadLocalUtil {
    private static ThreadLocal<ApUser> USER_THREAD_LOCAL = new ThreadLocal<>();


    public static void set(ApUser user){
        USER_THREAD_LOCAL.set(user);
    }


    public static ApUser get(){
        return USER_THREAD_LOCAL.get();
    }


    public static void clear(){
        USER_THREAD_LOCAL.remove();
    }
}
